<template>
  <div>
     <button @click="sendMsg">传递信息给父组件</button>
  </div>
</template>

<script>
export default {
    data(){
        return {
            msg: '我是子组件传过来的值'
        }
    },
    methods:{
        sendMsg() {
            this.$parent.msg2 = this.msg
            this.$parent.func()
        }
        
    }
}
</script>

<style>

</style>